/**
 * Empolyee类， 包含了工人的基本信息。
 */
public class Empolyee {

    private String name;
    private int age;
    private double salary;


    // 构造方法儿
    public Empolyee(String n, int a, double s) {
        name = n;
        age = a;
        salary = s;
    }

    public String getName(){
        return name;
    }

    public int getAge() {
        return age;
    }

    public double getSalary() {
        return salary;
    }

    public void setName(String name) {
        this.name = name;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public void setSalary(double salary) {
        this.salary = salary;
    }

    public void raiseSalary(double precent) {
        double raise = salary *  precent /100;
        salary += raise;
    }

    // 改写一下， salary的默认toString方法
    public String toString(){
        return "name"+name+", age"+age+",salary"+salary;
    }
}
